import http from '@http/http'

// area相关接口
export const _searchAreaByName = dot => http.POST('/api/superAdmin/selectAreaByAreaname', dot)

export const _selectAreaByAreaID = AreaID => http.POST('/api/superAdmin/selectAreaByAreaID?' + 'AreaID=' + AreaID)

export const _areaAll = dot => http.POST('/api/superAdmin/areaAll', dot)

export const _areaDelete = areaID => http.DELETE('/api/superAdmin/areaDelete' + '?AreaID=' + areaID)

export const _areaModify = Area => http.POST('/api/superAdmin/areaModify', Area)

export const _getTotalPeopleByAreaID = AreaID => http.POST('/api/superAdmin/getTotalPeopleByAreaID?' + 'AreaID=' + AreaID)

export const _areaAdd = area => http.POST('/api/superAdmin/areaAdd', area)

// 楼栋相关
export const _searchBuildingByName = dot => http.POST('/api/superAdmin/selectBuildingWithAreaNameByBuildingName', dot)

export const _buildingAll = dot => http.POST('/api/superAdmin/buildingAll', dot)

export const _buildingDelete = BuildingID => http.DELETE('/api/superAdmin/buildingDelete' + '?BuildingID=' + BuildingID)

export const _buildingModify = Building => http.POST('/api/superAdmin/buildingModify', Building)

export const _getTotalPeopleByBuildingID = BuildingID => http.POST('/api/superAdmin/getTotalPeopleByBuildingID?BuildingID=' + BuildingID)

export const _buildingAdd = Building => http.POST('/api/superAdmin/buildingAdd', Building)

// 学生住宿相关
export const _studentAll = DOT => http.POST('/api/superAdmin/studentAll', DOT)

export const _searchStudentByNameAndAccount = DOT => http.POST('/api/superAdmin/selectStudentByNameAndAccount', DOT)

export const _searchLeaderByNameAndAccount = DOT => http.POST('/api/superAdmin/selectLeaderByNameAndAccount', DOT)

export const _searchDormAdminByNameAndAccount = DOT => http.POST('api/superAdmin/selectDormitoryAdminByNameAndAccount', DOT)

export const _searchTeacherByNameAndAccount = DOT => http.POST('/api/superAdmin/selectTeacherByNameAndAccount', DOT)

export const _searchKeeperByNameAndAccount = DOT => http.POST('/api/superAdmin/selectKeeperByNameAndAccount', DOT)

export const _leaderAll = DOT => http.POST('/api/superAdmin/leaderAll', DOT)

export const _teacherAll = DOT => http.POST('/api/superAdmin/teacherAll', DOT)

export const _dormAdminAll = DOT => http.POST('/api/superAdmin/dormitoryAdminAll', DOT)

export const _keeperAll = DOT => http.POST('/api/superAdmin/keeperAll', DOT)

export const _leaderModify = Leader => http.POST('/api/superAdmin/modifyLeader', Leader)

export const _studentModify = Student => http.POST('/api/superAdmin/modifyStudent', Student)

export const _dormAdminModify = DormitoryAdmin => http.POST('/api/superAdmin/modifyDormitoryAdmin', DormitoryAdmin)

export const _teacherModify = Teacher => http.POST('/api/superAdmin/modifyTeacher', Teacher)

export const _keeperModify = Keeper => http.POST('/api/superAdmin/modifyKeeper', Keeper)

export const _addBatchStudent = students => http.POST('/api/superAdmin/addBatchStudent', students)

export const _addStudent = student => http.POST('/api/superAdmin/addStudent', student)

export const _addBatchTeacher = teacher => http.POST('/api/superAdmin/addBatchTeacher', teacher)

export const _addTeacher = teachers => http.POST('/api/superAdmin/addStudent', teachers)

export const _addKeeper = keeper => http.POST('/api/superAdmin/addKeeper', keeper)

export const _addLeader = leader => http.POST('/api/superAdmin/addLeader', leader)

export const _addDormAdmin = dormAdmin => http.POST('/api/superAdmin/addDormitoryAdmin', dormAdmin)

export const _searchRoomByAreaNameAndBuildingNameAndRoomName = DOT => http.POST('/api/superAdmin/searchRoomByAreaNameAndBuildingNameAndRoomName', DOT)

export const _roomAll = DOT => http.POST('/api/superAdmin/roomAll', DOT)

export const _getTotalPeopleByRoomID = data => http.POST('/api/superAdmin/getTotalPeopleByRoomID' + '?RoomID=' + data)

export const _selectRoomByBuildingIDAndFloor = (buildingID, floor) => http.POST('/api/superAdmin/selectRoomByBuildingIDAndFloor?' + 'buildingID=' + buildingID + '&' + 'floor=' + floor)

export const _modifyPositionOfRoomsInOneFloor = rooms => http.POST('/api/superAdmin/modifyPositionOfRoomsInOneFloor', rooms)

export const _allocateRoomsInManyFloors = (startFloor, endFloor, BuildingID) => http.POST('/api/superAdmin/allocateRoomsInManyFloors?' + 'startFloor=' + startFloor + '&' + 'endFloor=' + endFloor + '&' + 'BuildingID=' + BuildingID)
